package com.antfin.exam.member.controller;

import com.antfin.exam.member.service.MemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/member")
public class MemberController {
    @Autowired
    MemberService memberService;
    /**
     * 调用此API，给指定用户领抢积分
     * 这里使用GET，为了方便调试
     * @return
     */
    @RequestMapping(path="/{userId}/take-bonus-score/{bonusScoreId}", method = {RequestMethod.GET,RequestMethod.POST})
    public int takeBonusScore(
            @PathVariable("userId") String userId
            ,@PathVariable("bonusScoreId") String bonusScoreId){
        return memberService.takeBonusScore(userId,bonusScoreId);
    }


}
